package cn.stylefeng.guns.modular.cb.mapper;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.cb.entity.CbCustomerStaff;
import cn.stylefeng.guns.modular.cb.model.params.CbCustomerStaffParam;
import cn.stylefeng.guns.modular.cb.model.result.CbCustomerStaffResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wj
 * @since 2021-01-07
 */
public interface CbCustomerStaffMapper extends BaseMapper<CbCustomerStaff> {

    /**
     * 获取列表
     *
     * @author wj
     * @Date 2021-01-07
     */
    List<CbCustomerStaffResult> customList(@Param("paramCondition") CbCustomerStaffParam paramCondition);

    /**
     * 获取map列表
     *
     * @author wj
     * @Date 2021-01-07
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") CbCustomerStaffParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author wj
     * @Date 2021-01-07
     */
    Page<CbCustomerStaffResult> customPageList(@Param("page") Page page, @Param("paramCondition") CbCustomerStaffParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author wj
     * @Date 2021-01-07
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") CbCustomerStaffParam paramCondition);

    /**
     * 学生的校友-学长
     * @param paramCondition
     * @return
     */
    Page<CbCustomerStaff> alumniByStaffList(@Param("page") Page page, @Param("paramCondition") CbCustomerStaffParam paramCondition);

    /**
     * 获取职员信息
     * @param paramCondition
     * @return
     */
    CbCustomerStaffResult getStaff(@Param("paramCondition") CbCustomerStaffParam paramCondition);

    /**
     * 获取职员详情信息
     * @param paramCondition
     * @return
     */
    CbCustomerStaffResult getStaffDetail(@Param("paramCondition") CbCustomerStaffParam paramCondition);

    /**
     * 学生查询所有学长所在的公司
     * @param schoolNo
     * @return
     */
    List<CbCustomerStaffResult> companyByAlumni(@Param("schoolNo") String schoolNo);

    /**
     * 删除员工所在企业
     * @param staffId
     * @return
     */
    int deleteStaffCompany(@Param("id") Long staffId);

    /**
     * 员工数量统计
     * @return
     */
    List<Map<String,Object>> queryDateCount(@Param("startDate")String startDate, @Param("countArr")String[] countArr);

    /**
     * 修改用户状态
     */
    int setUserStatus(@Param("userId") Long userId, @Param("status") String status);

    /**
     * 员工列表
     * @param paramCondition
     * @return
     */
    Page<CbCustomerStaffResult> staffList(@Param("page") Page page, @Param("paramCondition") CbCustomerStaffParam paramCondition);
}
